package com.pr.beans;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_news")
@ApiModel(value="公告对象", description="")
public class News {

    @ApiModelProperty(value = "公告ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "公告ID")
    @TableField(value = "title")
    private String title;

    @ApiModelProperty(value = "公告内容")
    @TableField(value = "content")
    private String content;

    @ApiModelProperty(value = "公告图片地址")
    @TableField(value = "img")
    private String img;

    @ApiModelProperty(value = "公告发布时间")
    @TableField(value = "times")
    private String times;

    @ApiModelProperty(value = "是否删除 1删除  0未删除")
    @TableField(value = "del")
    private Integer del;

    public News(Integer id, Integer del) {
        this.id = id;
        this.del = del;
    }
}